{block #title}Vzorkova detail - {$showroom->title}{/block}
{block #head}
<script type="text/javascript" src="{$basePath}/js/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="{$basePath}/js/colorbox/i18n/jquery.colorbox-cs.js"></script>
<link rel="stylesheet" href="{$basePath}/js/colorbox/colorbox.css" type="text/css" media="screen" />

<script type="text/javascript">
    $(document).ready(function() {
        // colorbox
        $("a[rel='gallery']").colorbox({ width:"1100px", height:"700px" });
    });    
</script>
{/block}

{block #content}
<div id="showroom-detail-info">
    <h1 id="showroom-detail-title">{$showroom->title}</h1>
    <div id="showroom-detail-manufacturer">{$showroom->manufacturer->title}</div>    
    {$showroom->description}
</div>
<div class="showroom-detail-images">
{foreach $showroom->related('showroom_has_images') as $showroomImage}
    {if $iterator->getCounter() == 1}
    <a id="showroom-detail-main-image-crop" href="{imagePath $showroomImage->image->id_image}" rel="gallery">
        <img id="showroom-detail-main-image" src="{imagePath $showroomImage->image->id_image}" alt="{$showroomImage->image->title}" />   
    </a>    
    <div id="showroom-detail-image-list">
    {else} 
        <a href="{imagePath $showroomImage->image->id_image}" class="showroom-detail-image-crop showroom-detail-image-crop-wider" rel="gallery">
            <img class="showroom-detail-image" src="{imageThumbPath $showroomImage->image->id_image}" alt="{$showroomImage->image->title}" />            
        </a>
    {/if}
{/foreach}
    </div>

</div>
<div class="clear"></div>
<div id="showroom-detail-tiles">
    <div n:foreach="$showroom->related('showroom_has_tiles') as $showroomTile" class="tile-container{if $iterator->counter % 7 == 0} tile-right{/if}">
        {var $tile = $showroomTile->tile}
        <a class="preview tile-img-wrapper" href="{imagePath $tile->image->id_image}">
            <img src="{imageThumbPath $tile->image->id_image}" alt="akcni zbozi" />
        </a>
        <div class="tile-title">
            {$tile->manufacturer->title|upper}
        </div>
        <div class="tile-info">
            {$tile->code}<br />
            {$tile->type->title}<br />
            {$tile->width}x{$tile->height}<br />
            {var price = floor($tile->price * (1 - $tile->manufacturer->discount / 100))}
            <span class="tile-price">{$price|number:2:',':' '} Kč/{$tile->type->unit}</span>
        </div>
    </div>
</div>
<div class="clear"></div>

{/block}
